home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / c-lang / strmc105.lha / StormC-Demo / INCLUDE / clib / iffparse_protos.h < prev    next >
C/C++ Source or Header  |  1996-01-02  |  4KB  |  120 lines

  1. #ifndef  CLIB_IFFPARSE_PROTOS_H
  2. #define  CLIB_IFFPARSE_PROTOS_H
  3.  
  4. /*
  5. **    $VER: iffparse_protos.h 39.1 (1.6.92)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  LIBRARIES_IFFPARSE_H
  18. #include <libraries/iffparse.h>
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. /*--- functions in V36 or higher (Release 2.0) ---*/
  26.  
  27. /* Basic functions */
  28.  
  29. struct IFFHandle *AllocIFF( void );
  30. LONG OpenIFF( struct IFFHandle *iff, long rwMode );
  31. LONG ParseIFF( struct IFFHandle *iff, long control );
  32. void CloseIFF( struct IFFHandle *iff );
  33. void FreeIFF( struct IFFHandle *iff );
  34.  
  35. /* Read/Write functions */
  36.  
  37. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  38. LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  39. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  40.     long numRecords );
  41. LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  42.     long numRecords );
  43.  
  44. /* Context entry/exit */
  45.  
  46. LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
  47. LONG PopChunk( struct IFFHandle *iff );
  48.  
  49. /* Low-level handler installation */
  50.  
  51. LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position,
  52.     struct Hook *handler, APTR object );
  53. LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position,
  54.     struct Hook *handler, APTR object );
  55.  
  56. /* Built-in chunk/property handlers */
  57.  
  58. LONG PropChunk( struct IFFHandle *iff, long type, long id );
  59. LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  60. LONG StopChunk( struct IFFHandle *iff, long type, long id );
  61. LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  62. LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
  63. LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray,
  64.     long numPairs );
  65. LONG StopOnExit( struct IFFHandle *iff, long type, long id );
  66.  
  67. /* Context utilities */
  68.  
  69. struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
  70. struct CollectionItem *FindCollection( struct IFFHandle *iff, long type,
  71.     long id );
  72. struct ContextNode *FindPropContext( struct IFFHandle *iff );
  73. struct ContextNode *CurrentChunk( struct IFFHandle *iff );
  74. struct ContextNode *ParentChunk( struct ContextNode *contextNode );
  75.  
  76. /* LocalContextItem support functions */
  77.  
  78. struct LocalContextItem *AllocLocalItem( long type, long id, long ident,
  79.     long dataSize );
  80. APTR LocalItemData( struct LocalContextItem *localItem );
  81. void SetLocalItemPurge( struct LocalContextItem *localItem,
  82.     struct Hook *purgeHook );
  83. void FreeLocalItem( struct LocalContextItem *localItem );
  84. struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type,
  85.     long id, long ident );
  86. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem,
  87.     long position );
  88. void StoreItemInContext( struct IFFHandle *iff,
  89.     struct LocalContextItem *localItem,
  90.     struct ContextNode *contextNode );
  91.  
  92. /* IFFHandle initialization */
  93.  
  94. void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook );
  95. void InitIFFasDOS( struct IFFHandle *iff );
  96. void InitIFFasClip( struct IFFHandle *iff );
  97.  
  98. /* Internal clipboard support */
  99.  
  100. struct ClipboardHandle *OpenClipboard( long unitNumber );
  101. void CloseClipboard( struct ClipboardHandle *clipHandle );
  102.  
  103. /* Miscellaneous */
  104.  
  105. LONG GoodID( long id );
  106. LONG GoodType( long type );
  107. STRPTR IDtoStr( long id, STRPTR buf );
  108.  
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112.  
  113. #ifdef STORMPRAGMAS
  114. #ifndef _INCLUDE_PRAGMA_IFFPARSE_LIB_H
  115. #include <pragma/iffparse_lib.h>
  116. #endif
  117. #endif
  118.  
  119. #endif     /* CLIB_IFFPARSE_PROTOS_H */
  120.